//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Jobs, JobsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooJobsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<JobsResponse>(`/uctoo/jobs/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooJobs = async (id: string) => {
  return requestClient.get<Jobs>(`/uctoo/jobs/${id}`);
};

export const adductooJobs = async (data: Partial<Jobs>) => {
  return requestClient.post<Jobs>('/uctoo/jobs/add', data);
};

export const edituctooJobs = async (data: Partial<Jobs>) => {
  return requestClient.post<Jobs>('/uctoo/jobs/edit', data);
};

export const deleteuctooJobs = async (id: string) => {
  return requestClient.post<any>('/uctoo/jobs/del', { id });
};
